package com.breeze.designpattern.proxy;

import java.lang.reflect.Proxy;

public class TestClient {
    public static void main(String[] args) {
        IDeveloper breeze = new AndroidDeveloper("breeze");
        ClassLoader classLoader = breeze.getClass().getClassLoader();
        // 动态产生的代理对象
        IDeveloper breezeProxy = (IDeveloper) Proxy.newProxyInstance(classLoader, breeze.getClass().getInterfaces(), new MyInvocationHandler(breeze));
        breezeProxy.code();
    }
}
